// 引入封装的 axios
import request from '@/utils/request'

// 获取部门列表信息
export const getCompanyDataRequest = () => request.get('/company/department')

// 删除部门：
export const delDepartmentRequest = (id) => request.delete(`/company/department/${id}`)

// 获取部门负责人列表
export const getDepartmentsPrincipalRequest = () => request.get('/sys/user/simple')

// 添加部门：
export const addDepartmentRequest = (obj) => request.post('/company/department', obj)

// 获取单个部门详情
export const getDepartmentsDetailRequest = (id) => request.get(`/company/department/${id}`)

// 修改部门：
export const editDepartmentRequest = (obj) => request.put(`/company/department/${obj.id}`, obj)
